home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / com / computer / casio_st / prog_fx / oisac2 / l_5750.txt < prev    next >
Text File  |  1994-03-01  |  780b  |  21 lines

  1. 5 ONERRORGOTO900
  2. 10 MODE8:DIM:ERASEa,a$:DIMa(2),a$(2):a$(0)="r:inside":a$(1)="R:outside":a$(2)="l:side"
  3. 20 s=0:n=3:ANGLE0:c$=CHR$(5):m$="Polygon (r,R,l)   "
  4. 40 s$="A:area":z=s:GOSUB500:s=z
  5. 41 s$="n:number":z=n:GOSUB500:n=z:IFn<3 ORFRACn<>0 THEN41
  6. 45 CLS:PRINTm$;:PRINT
  7. 50 a(0)=SQR(s/n/TAN(180/n))
  8. 51 a(1)=SQR(2*s/n/SIN(360/n))
  9. 52 a(2)=SQR(ABS(4*s/n*TAN(180/n)))
  10. 100 FORi=0 TO2:PRINTc$;a$(i)" =";a(i);
  11. 110 w=ASC(INPUT$(1,@)):IFw=13 THEN170
  12. 120 IFw=30 ANDi>0 THENi=i-2:GOTO170
  13. 130 IFw=31 ANDi<2 THEN170
  14. 160 GOTO110
  15. 170 NEXT:GOTO40
  16. 500 CLS:PRINTm$;s$;
  17. 510 LOCATE0,1:PRINTc$;LEFT$(s$,1);"=";z;"?";:INPUT@42;z:LOCATE0,0:IFz<0 THEN510 ELSERETURN
  18. 900 IFERR=1 THENCLS:ONERRORGOTO0
  19. 910 IFERL=510 THENRESUME510
  20. 920 LOCATE0,1:PRINTc$;"not found";:z$=INPUT$(1,@):RESUME40
  21.